<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * Copyright (C) 2007  Robert Moss
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

?>

<!-- Header with Project Name-->
<?php if ($showClub_config['show_project_heading'] == "1" OR $overall_config['show_project_heading'] == "1") { ?>
<div class="componentheading" <?php if ($showClub_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") echo 'style="float:left;"';?>><?php echo HTML_joomleague::showTitle($project, $overall_config['project_heading_type']); ?></div>
<!-- Druckfunktion -->
<?php if ($showClub_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") {
HTML_joomleague::PrintIcon( $row, $params, false, '' );
};?>
<!-- Druckfunktion Ende -->
<?php } ?>
<!-- Header END -->

<!-- Bereichsüberschrift z.B Tabelle, Tippabgabe usw. -->
<table width="100%" class="contentpaneopen">
	<tr>
		<td class="contentheading"><?php echo _JL_CLUB_INFO;?><?php echo $club->name;?></td>
	</tr>
</table>
<!-- Bereichsüberschrift Ende -->

<br />

<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <tr>
   <td><br /></td>
    <td>
            <table width="70%">
        <tr>
          <td width="30%"><b><?php echo _JL_CLUB_ADDRESS;?></b></td>
          <td width="70%"><?php echo $club->address;?></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td align="left"><?php printf("%s %s", $club->zipcode, $club->location);?></td>
        </tr>
        <?php
        if ($club->phone)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_PHONE;?></b></td>
          <td><?php echo $club->phone;?></td>
        </tr>
        <?php
        }
        if ($club->fax)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_FAX;?></b></td>
          <td><?php echo $club->fax;?></td>
        </tr>
        <?php
        }
        if ($club->email)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_EMAIL;?></b></td>
          <?
            //to prevent spam, crypt email display if nospam_email is selected
            //or user is a guest
            if ($my->id or !$overall_config['nospam_email']) {
              echo "<td><a href='mailto: $club->email'>$club->email</a></td>";
            }
            else {
              echo "<td>".str_replace("@", "[at]",$club->email )."</td>";
            }
          ?>
        </tr>
        <?php
        }
        if ($club->website)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_WWW;?></b></td>
          <td><a href="<?php echo $club->website;?>" target='_blank'><?php echo $club->website;?></a></td>
        </tr>
        <?php
        }
        if ($club->president)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_PRESIDENT;?></b></td>
          <td><?php echo $club->president;?></td>
        </tr>
        <?php
        }
        if ($club->manager)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_MANAGER;?></b></td>
          <td><?php echo $club->manager;?></td>
        </tr>
        <?php
        }
        if ($club->founded)
        { ?>
        <tr>
          <td><b><?php echo _JL_CLUB_FOUNDED;?></b></td>
          <td><?php echo $club->founded;?></td>
        </tr>
        <?php
        } ?>
      </table>
    </td>
<?php if ($showClub_config['show_club_logo']==1&&$club->logo_big!=''&&!is_null($club->logo_big)&&file_exists($mosConfig_absolute_path.'/'.$club->logo_big)) {;?>    
    <td align="center" width="30%" valign="middle" >
      <img src="<?php echo $mosConfig_live_site ?>/<?php echo $club->logo_big;?>" alt="<?php  echo $club->name?>" title="<?php  echo $club->name?>" />
    </td>
<?php };?>    
  </tr>
</table>
<br />
<!-- Show playgrounds of club START -->
<?php if ($showClub_config['show_playgrounds_of_club']==1) {;?>
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
	<tr class="sectiontableheader">
    <td><?php echo _JL_ADMIN_VIEW_PLAYGROUNDS;?> <?php  echo $club->name?></td>
  </tr>
</table>
<br />
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <tr>
    <td><br /></td>
    <td align="center">
<?php
if (count($stadiums)>0) {
	foreach ($stadiums AS $stadium) {
		for ($x=0;$x<count($stadium);$x++) {
			$thisstad= new Playground($database);
			$thisstad->load($stadium[$x]->standard_playground);
?>
<table>
	<tr>
		<td align="center">
<?php
			if ($thisstad->picture!=''&&!is_null($thisstad->picture)&&file_exists($mosConfig_absolute_path.'/'.$thisstad->picture)) { ?>
		<img src="<?php echo $mosConfig_live_site ?>/<?php echo $thisstad->picture;?>" alt="<?php  echo $thisstad->name?>" title="<?php  echo $thisstad->name?>" />
<?php } ?>
		<p><a href="<?php echo sefRelToAbs("index.php?option=com_joomleague&amp;func=showPlayground&amp;p=$project->id&amp;pgid=$thisstad->id&amp;Itemid=$Itemid");?>"><?=$thisstad->name;?></a></p>
		</td>
	</tr>
</table>
<?php 
		}
	} 
}
?></td>
</tr>
</table>
<?php };?>
<!-- Show playgrounds of club END -->

<br />

<!-- Show teams of this club START -->
<?php if ($showClub_config['show_teams_of_club']==1) {;?>
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
	<tr class="sectiontableheader">
      <td><?php echo _JL_CLUB_DETAILS;?></td>
  </tr>
</table>
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">  
  <tr>
    <td>
<?php 
//tid, name, picture, description
    foreach ($rows as $row) {
    if ($row->team_name) { 
      echo '<ul><li><a href="'.sefRelToAbs('index.php?option=com_joomleague&amp;func=showTeamInfo&amp;p='.$project->id.'&amp;tid='.$row->id.'&amp;Itemid='.$Itemid).'">'.$row->team_name.'</a>';
    if ($row->team_shortcut) { 
      echo "&nbsp;(".$row->team_shortcut.")";
      } 
    } echo '</li></ul>'; 
    if ($row->team_description) {
      echo _JL_TEAMINFO; echo $row->team_description; echo '<br /><br />';?>
<?php
			}
		}	
?>
    </td>
  </tr>
</table>
<?php };?>
<!-- Show teams of this club START -->

<!-- Print Button START -->
<?php if ($showClub_config['show_back_button'] > 0 OR $overall_config['show_back_button'] > 0) {;?>
<?php if ($showClub_config['show_back_button'] == "1" OR $overall_config['show_back_button'] == "1") echo '<div align="left">'; else echo '<div align="right">';?>
<?php
$params = & new mosParameters( '' );
$params->def( 'back_button', true );
$params->def( 'popup', false );
mosHTML::BackButton( $params );
?></div> 
<?php };?>
<!-- Print Button END -->
